using System;
using System.Collections.Generic;
using System.Text;
using Preparation;
using Tester.Forms;
using Tester.GuiActions.Actions.Impl;

namespace Tester.GuiActions.Actions.Impl
{
    public class CodeEditAction : ViewTestItemBaseAction
    {
        public override void MainAction(object sender, EventArgs e)
        {
            if (Visible)
            {
                CodeEditControl control = new CodeEditControl();
                control.SrcFileName =
                    TesterMultyDocument.Instance.SrcFile(((Test) TesterList.Instance.SelectedItems[0].Tag).Properties.Name);
                TesterMainForm.Instance.PushControl(control);
            }
        }
    }
}
